﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DailyFx.Book
{
	public interface IRouter
	{
		/// <summary>
		///		Gets the table of this router for routing .
		/// </summary>
		ITable Table { get; }

		/// <summary>
		///		Try to find the record of specified key. 
		///		If the key is found, the router will be positioned on the record with the key.
		/// </summary>
		bool TrySeek ( DateTime key );

		/// <summary>
		///		Try to move back to the previous record.
		/// </summary>
		bool TryMoveBack ();
		
		/// <summary>
		///		Try to move to the next record .
		/// </summary>
		bool TryMoveNext ();

		/// <summary>
		///		un-position the router on the table.
        ///		A <see cref="TryMoveNext"/> will then position it on the first record.
		/// </summary>
		void Rewind ();

		//IEnumerable

	}
}
